use async_trait::async_trait;
use log::debug;

use crate::error::*;
use crate::modules::ProcessModule;

pub struct Example {}

#[async_trait]
impl ProcessModule for Example {
    fn get_name(&self) -> &str {
        "example"
    }

    async fn init_process_handle(&self) -> Result<()> {
        debug!("init example process handle");
        Ok(())
    }

    async fn exit_process_handle(&self) -> Result<()> {
        debug!("exit example process handle");
        Ok(())
    }
}

impl Example {
    pub fn new() -> Self {
        Example {}
    }
}
